<?php

namespace App\Store\Models\Wxapp;

use App\Common\Services\Common;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;

class WxappAddress extends Model
{
    protected $table = 'site_wxapp_mem_address';
    public $timestamps = false;
    protected $primaryKey = 'id';
    protected $guarded = ['_token'];

    public static function getListByMem($cp_id,$mem_id)
    {
        $query = self::where(['cp_id'=>$cp_id,'mem_id'=>$mem_id,'is_del'=> 1])->orderBy('create_at', 'desc');
        $list = $query->get()->toArray();
        return ['list' => $list];
    }
}